from concurrent.futures import ProcessPoolExecutor

from single_thread import urls, crawl, save


if __name__ == '__main__':
    import time

    start = time.time()

    with ProcessPoolExecutor() as pool:
        result = pool.map(crawl, urls)
        pool.map(save, result)

    print(time.time() - start)
